#ifndef REVISEDEVICEINFO_H
#define REVISEDEVICEINFO_H

#include <QDialog>
#include <QLineEdit>
#include <QIntValidator>
#include <QString>
#include <QMessageBox>

#include "global.h"
#include "custommessagebox.h"

namespace Ui {
class ReviseDeviceInfo;
}

class ReviseDeviceInfo : public QDialog
{
    Q_OBJECT

public:
    explicit ReviseDeviceInfo(QWidget *parent = nullptr);
    ~ReviseDeviceInfo();

private:
    Ui::ReviseDeviceInfo *ui;

signals:
    void sendNewDeviceInfo(int row, QString deviceName, QString deviceIp, QString devicePort);

public:
    void renderCurrentInfo(int row, QString deviceName, QString deviceIp, QString devicePort, QString deviceId);

private:
    int row;
    QString deviceName;
    QString deviceIp;
    QString devicePort;
    QString deviceId;
    CustomMessageBox *cusMsg;

private:
    void setDataValidator(QLineEdit *obj, QString text, int max);


};

#endif // REVISEDEVICEINFO_H
